package com.study.customer.controller.clients;

import com.study.customer.controller.dto.OrderDto;
import com.study.customer.pojo.GameOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("shop-service")
public interface OrderClient {

    @PostMapping("/order")
    public GameOrder orderGames(@RequestBody OrderDto orderDto);

    @GetMapping("/order/{id}")
    public GameOrder getById(@PathVariable Long id);
}
